<section class="form box">
<form id="category_continue"
	action="<?php echo $this->geturl('post-an-add-information', 'listing')?>"
	method="get">
	<fieldset class="category_list">
		<legend>选择合适你宝贝的分类</legend>
		<div id="category">
			<div id="category1">
				<ul>
				<?php foreach($this->level1 as $cat):?>
					<li val="<?php echo $cat->_id?>"
						class="category1 <?php echo $has_customized? 'disabled' : ''?> <?php echo !empty($cat->customization) ? 'to_disable' : ''?>"><?php echo $cat->name?>
					</li>
					<?php endforeach;?>
				</ul>
			</div>
			<div id="category2" class="hide">
			<?php
			$first      = true;
			$previousid = '';
			?>
			<?php foreach($this->level2->sort(array("path.0"=>1, "pos"=>1)) as $cat):?>
			<?php if ((string) $cat->path[0] != $previousid):?>
			<?php if (!$first):?>
				</ul>
				<?php endif;?>
				<?php
				$first      = false;
				$previousid = (string) $cat->path[0];
				?>
				<ul id="<?php echo $cat->path[0]?>" class="hide">
				<?php endif;?>
					<li val="<?php echo $cat->_id?>"
						class="category2 <?php echo $has_customized? 'disabled' : ''?> <?php echo !empty($cat->customization) ? 'to_disable' : ''?>"><?php echo $cat->name?>
					</li>
					<?php endforeach;?>
			
			</div>
			<!--div id="category3" class="hide"> </div-->
		</div>
	</fieldset>
	<fieldset class="category_selected cat_selected">
		<legend>你选择的分类</legend>

		<div class="desc">
			<ul class="selected_category_list">
			<?php foreach((array) $this->selected_category as $cat):?>
				<li id="li_<?php echo $cat->_id?>"><input type="hidden"
					name="category[]" value="<?php echo $cat->_id?>"
					id="hidden_<?php echo $cat->_id?>"> <?php
					$tmp = array();
					foreach((array) $cat->getParentTree() as $p) {
						$tmp[] = $p->name;
					}
					echo implode(' &gt; ', $tmp);
					?> <a class="remove_link" rel="<?php echo $cat->_id?>"><?php echo $this->t('Remove')?>
				</a></li>
				<?php endforeach;?>
			</ul>
		</div>
		<div class="alert">
			<p>
				你可以在左边选择<em>更多分类</em>，增加信息点击率。
			</p>
		</div>
		<div class="action">
			<div class="button em submit" style="display: block;">
				<button>下一步</button>
			</div>
		</div>
	</fieldset>
</form>
</section>
